import request from '@/utils/request'
/**
 *
 * 文章阅览
 *
 **/
// 查询列表接口
export const getDishPage = (params: any) => {
  return request({
    'url': '/admin/article/page',
    method: 'get',
    params
  })
}

// 获取菜品分类列表
export const getCategoryList = (params: any) => {
  return request({
    url: '/category/list',
    method: 'get',
    params
  })
}

// 查菜品列表的接口
export const queryDishList = (params: any) => {
  return request({
    url: '/dish/list',
    method: 'get',
    params
  })
}

//菜品分类数据查询
export const dishCategoryList = (params: any) => {
  return request({
    'url': '/admin/category/list',
    method: 'get',
    params: { ...params }
  })
}

//根据id查询文章
export const getArticleDetail = (id:string |(string|null)[]) => {
  return request({
    url: `/admin/article/${id}`,
    method: 'get',
  })
}
